package com.aurora.blog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aurora.blog.mapper.BlogPostCategoriesMapper;
import com.aurora.blog.domain.BlogPostCategories;
import com.aurora.blog.service.IBlogPostCategoriesService;

/**
 * 文章分类关联Service业务层处理
 * 
 * @author aurora
 * @date 2024-06-04
 */
@Service
public class BlogPostCategoriesServiceImpl implements IBlogPostCategoriesService 
{
    @Autowired
    private BlogPostCategoriesMapper blogPostCategoriesMapper;

    /**
     * 查询文章分类关联
     * 
     * @param id 文章分类关联主键
     * @return 文章分类关联
     */
    @Override
    public BlogPostCategories selectBlogPostCategoriesById(Long id)
    {
        return blogPostCategoriesMapper.selectBlogPostCategoriesById(id);
    }

    /**
     * 查询文章分类关联列表
     * 
     * @param blogPostCategories 文章分类关联
     * @return 文章分类关联
     */
    @Override
    public List<BlogPostCategories> selectBlogPostCategoriesList(BlogPostCategories blogPostCategories)
    {
        return blogPostCategoriesMapper.selectBlogPostCategoriesList(blogPostCategories);
    }

    /**
     * 新增文章分类关联
     * 
     * @param blogPostCategories 文章分类关联
     * @return 结果
     */
    @Override
    public int insertBlogPostCategories(BlogPostCategories blogPostCategories)
    {
        return blogPostCategoriesMapper.insertBlogPostCategories(blogPostCategories);
    }

    /**
     * 修改文章分类关联
     * 
     * @param blogPostCategories 文章分类关联
     * @return 结果
     */
    @Override
    public int updateBlogPostCategories(BlogPostCategories blogPostCategories)
    {
        return blogPostCategoriesMapper.updateBlogPostCategories(blogPostCategories);
    }

    /**
     * 批量删除文章分类关联
     * 
     * @param ids 需要删除的文章分类关联主键
     * @return 结果
     */
    @Override
    public int deleteBlogPostCategoriesByIds(Long[] ids)
    {
        return blogPostCategoriesMapper.deleteBlogPostCategoriesByIds(ids);
    }

    /**
     * 删除文章分类关联信息
     * 
     * @param id 文章分类关联主键
     * @return 结果
     */
    @Override
    public int deleteBlogPostCategoriesById(Long id)
    {
        return blogPostCategoriesMapper.deleteBlogPostCategoriesById(id);
    }
}
